package com.xgh.design.adapter;

/**
 * @ClassName CHNAdapter
 * @Description
 * @Author xinggh
 * @Date 2020/8/6 21:55
 * @Version 1.0
 **/
public class JPAAdapter implements DC5Adapter {

    int v = 110;

    @Override
    public boolean support(AC ac) {
        return v == ac.outputAC();
    }

    @Override
    public int outputDC5V(AC ac) {
        int adapterInput = ac.outputAC();
        int adapterOutput = adapterInput / 22;
        System.out.println("JAP 输入：" + adapterInput + "输出：" + adapterOutput);
        return adapterOutput;
    }
}
